// 学生用户表
class User {
  async getUser(studentID) {
    const ret = await global
      ._db('student')
      .first('Sname', 'Stel', 'Spwd', 'Salt')
      .where({
        Sno: studentID,
      });
    return ret;
  }

  async insertUser(data) {
    await global._db('student').insert(data);
  }

  async updateUser(data, studentID) {
    await global
      ._db('student')
      .where('Sno', studentID)
      .update(data);
  }
}

const user = new User();

module.exports = user;
